﻿//////////////////////////////////////////////////////////////////////////////
//
//  Copyright © 1998-2024 Glodon Company Limited.  All rights reserved.
//
//  Use of this software is subject to the terms of the Glodon license
//  agreement provided at the time of installation or download, or which
//  otherwise accompanies this software in either electronic or hard copy form.  
//
//////////////////////////////////////////////////////////////////////////////

#pragma once

#include "GcmpModel.h"
namespace gcmp
{
    class IGraphicsElementShape;
    class IDocument;
    class Vector3d;
    class ElementId;
    
    /// \brief 表格工具类
    class GCMP_MODEL_EXPORT IDrawingTableUtils
    {
    public:
        /// \brief 获取表格夹点移动后的表格和单元格的视图GRep
        ///
        /// 表格使用平台的夹点组件，调用此接口才有效。
        /// \param pDocument 表格所属文档
        /// \param shapeHandlerMoveElementId 表格上的夹点的ElementId
        /// \param originPoint 起点
        /// \param moveVector 移动向量
        /// \return 返回移动后的视图GRep
        static OwnerPtr<IGraphicsElementShape> GetTableViewShapeAfterElementShapeHandleMove(IDocument* pDocument, const ElementId& shapeHandlerMoveElementId, const gcmp::Vector3d& originPoint, const gcmp::Vector3d& moveVector);
    
        /// \brief 判断夹点对象是否是分页夹点
        ///
        /// \param pDocument 夹点对象所属文档
        /// \param elementShapeHandleId 夹点ElementId
        /// \return 是返回true,否则返回false
        static bool IsPageGripPoint(IDocument* pDocument, ElementId elementShapeHandleId);
    };
}